package com.stealtime.common.exception;


import com.stealtime.common.response.JsonResult;
import com.stealtime.common.response.ResultEnums;

public class TTException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public TTException(String message, Throwable cause) {
        super(message, cause);
    }

    public TTException(int code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public TTException(String message) {
        super(message);
    }

    public TTException(int code, String message) {
        super(message);
        this.code = code;
    }

    public TTException(ResultEnums resultEnums) {
        super(resultEnums.getMsg());
        this.code = resultEnums.getCode();
    }

}
